import { post, get } from '../http'
// -------------------------------采购申购单-----------------------------
// 1采购申购单列表（业务）
export const findPurchasePlanPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2采购申购单根据状态统计数量（业务）
export const findPurchasePlanCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3创建采购申购单
export const createPurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/createPurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4更新采购申购单
export const updatePurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/updatePurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 5获取外部采购公司
export const findCompanyListByOutPurchase = async (paylaod: any = {}) => {
  return await post('/user/v1/company/findCompanyList', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 6采购申购单提交审核
export const commitPurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/commitPurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 7作废采购申购单
export const cancelPurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/cancelPurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 8审核采购申购单-暂未用上
export const auditPurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/auditPurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 9撤回采购申购单
export const revokePurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/revokePurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 10获取采购申购单详情
export const getPurchasePlanInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/getPurchasePlanInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 12获取申购单明细详情
export const getPurchasePlanItemInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/getPurchasePlanItemInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 13申购单明细留言列表
export const findPurchaseLeaveMsgPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchaseLeaveMsgPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 14申购单明细留言
export const purchasePlanItemLeaveMsg = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/purchasePlanItemLeaveMsg', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 15申购单明细日志列表
export const findPurchasePlanItemLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanItemLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 16采购申购单列表（采购）
export const findPurchasePlanByPurchasePage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanByPurchasePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 17采购申购单根据状态统计数量（采购）
export const findPurchasePlanCountStatusByPurchase = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanCountStatusByPurchase', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 18申购单明细列表（业务）
export const findPurchasePlanItemPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanItemPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 19申购单明细根据状态统计数量（业务）
export const findPurchasePlanItemCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanItemCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 20采购申购单接单
export const receivePurchasePlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/receivePurchasePlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 21申购单明细截单
export const purchasePlanItemCutoff = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/purchasePlanItemCutoff', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 22申购单明细列表（采购）
export const findPurchasePlanItemByPurchasePage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanItemByPurchasePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 23申购单明细根据状态统计数量（采购）
export const findPurchasePlanItemCountStatusByPurchase = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findPurchasePlanItemCountStatusByPurchase', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 24申购单明细设置计划交货日期
export const purchasePlanItemSetGmtPlanDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/purchasePlanItemSetGmtPlanDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 25申购单明细设置采购状态
export const purchasePlanItemSetPurchaseStatus = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/purchasePlanItemSetPurchaseStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 26申购单明细设置标签
export const purchasePlanItemSetLabel = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/purchasePlanItemSetLabel', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 27获取申购单明细关联入库单明细
export const getReceiptItemByPlan = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/getReceiptItemByPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 28获取申购单明细关联采购明细批量
export const getPurchaseItemByPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/getPurchaseItemByPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// -------------------------------采购进度（状态）-----------------------------

// 1采购状态列表
export const findPurchaseStatusPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/status/findPurchaseStatusPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2创建采购状态
export const createPurchaseStatus = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/status/createPurchaseStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3删除采购状态
export const deletePurchaseStatus = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/status/deletePurchaseStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// -------------------------------采购标签-----------------------------
// 1采购标签列表
export const findPurchaseLabelPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/label/findPurchaseLabelPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2创建采购标签
export const createPurchaseLabel = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/label/createPurchaseLabel', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// 3更新采购标签
export const updatePurchaseLabel = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/label/updatePurchaseLabel', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// 4删除采购标签
export const deletePurchaseLabel = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/label/deletePurchaseLabel', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// -------------------------------申购单入库-----------------------------
// 1提交采购入库单
export const submitPurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/submitPurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2更新采购入库单
export const updatePurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/updatePurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3采购入库单列表（采购）
export const findReceiptByPurchasePage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptByPurchasePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4采购入库单状态统计数量（采购）
export const findReceiptCountStatusByPurchase = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptCountStatusByPurchase', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 5采购入库单作废
export const cancelPurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/cancelPurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 6采购入库单重新提交
export const resubmitPurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/resubmitPurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 7获取采购入库单详情
export const getReceiptInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/getReceiptInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 9采购入库单列表（业务）
export const findReceiptPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 10采购入库单状态统计数量（业务）
export const findReceiptCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 11采购入库单列表（仓储）
export const findReceiptByWarehousePage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptByWarehousePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 12采购入库单状态统计数量（仓储）
export const findReceiptCountStatusByWarehouse = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/receipt/v2/findReceiptCountStatusByWarehouse', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 13采购入库单拒收
export const refusePurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/refusePurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 14采购入库单签收
export const signPurchaseReceipt = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/receipt/v2/signPurchaseReceipt', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// -------------------------------采购单-----------------------------
// 1采购入库单拒收
export const placePurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/placePurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2采购单列表（采购）
export const findPurchasePage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchasePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3采购单状态统计数量（采购）
export const findPurchaseCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4采购单提交审核
export const commitPurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/commitPurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 5作废采购单
export const cancelPurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/cancelPurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 6采购单修改采购员
export const updatePurchaseUser = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/updatePurchaseUser', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 8撤回采购单
export const revokePurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/revokePurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 9采购单修改供应商
export const updatePurchaseSupplier = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/updatePurchaseSupplier', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 10创建采购单
export const createPurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/createPurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 11更新采购单
export const updatePurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/updatePurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 12更新采购单
export const getPurchaseOrderInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/getPurchaseOrderInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 13获取单明细详情
export const getPurchaseItemInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/getPurchaseItemInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 14采购单明细留言列表
export const findPurchaseItemLeaveMsgPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseLeaveMsgPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 15采购单明细留言
export const purchaseOrderItemLeaveMsg = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/purchaseOrderItemLeaveMsg', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 16采购单明细日志列表
export const findPurchaseItemLogPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseItemLogPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 17采购单列表（供应商）
export const findPurchaseBySupplierPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseBySupplierPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 18采购单状态统计数量（供应商）
export const findPurchaseCountStatusBySupplier = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseCountStatusBySupplier', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 19采购单接单
export const receivePurchaseOrder = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/receivePurchaseOrder', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 20采购单截单
export const purchaseOrderCutoff = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/purchaseOrderCutoff', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 21采购单明细列表（采购）
export const findPurchaseItemPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseItemPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 22采购单明细状态统计数量（采购）
export const findPurchaseItemCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseItemCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 23采购单明细状态统计数量（采购）
export const purchaseOrderItemSetLabel = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/purchaseOrderItemSetLabel', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 24采购单明细截单
export const purchaseOrderItemCutoff = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/order/v2/purchaseOrderItemCutoff', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 25采购单明细列表（供应商）
export const findPurchaseItemBySupplierPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseItemBySupplierPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 26采购单明细状态统计数量（供应商）
export const findPurchaseItemCountStatusBySupplier = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findPurchaseItemCountStatusBySupplier', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 27获取采购单关联交货单明细
export const getDeliveryByPurchaseId = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/getDeliveryByPurchaseId', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 28获取采购明细关联交货单明细
export const getDeliveryItemByPurchaseItemId = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/getDeliveryItemByPurchaseItemId', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// -------------------------------交货单-----------------------------
// 1创建交货单（采购）
export const createPurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/createPurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2采购交货单列表（采购）
export const findDeliveryPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/v2/findDeliveryPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}

// 3采购交货单状态统计数量（采购）
export const findDeliveryCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/v2/findDeliveryCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4获取采购交货单详情
export const getDeliveryInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/v2/getDeliveryInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 5采购交货单拒收
export const refusePurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/refusePurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 6采购交货单签收
export const signPurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/signPurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 8更新采购交货单
export const updatePurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/updatePurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 9更新采购交货单
export const resubmitPurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/resubmitPurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 10采购交货单作废
export const cancelPurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/cancelPurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 11创建交货单（供应商）
export const createSupplierDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/createSupplierDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 12采购交货单列表（供应商）
export const findDeliveryBySupplierPage = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/v2/findDeliveryBySupplierPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 13采购交货单状态统计数量（供应商）
export const findDeliveryCountStatusBySupplier = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/delivery/v2/findDeliveryCountStatusBySupplier', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 14采购交货单提交出库
export const outboundPurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/outboundPurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 15采购交货单提交出库
export const revokePurchaseDelivery = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/delivery/v2/revokePurchaseDelivery', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// ------------------------------生产工序模板-----------------------------
// 1生产工序模板列表
export const findProductionProcedurePage = async (paylaod?: any) => {
  return await get('/procurement/v1/production/procedure/findProductionProcedurePage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2创建生产工序模板
export const createProductionProcedure = async (paylaod?: any) => {
  return await post('/procurement/v1/production/procedure/createProductionProcedure', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3更新生产工序模板
export const updateProductionProcedure = async (paylaod?: any) => {
  return await post('/procurement/v1/production/procedure/updateProductionProcedure', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4删除生产工序模板
export const deleteProductionProcedure = async (paylaod?: any) => {
  return await post('/procurement/v1/production/procedure/deleteProductionProcedure', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// ------------------------------生产计划表-----------------------------
// 1创建生产计划
export const createProductionPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/createProductionPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 2生产计划列表
export const findProductionPlanPage = async (paylaod?: any) => {
  return await get('/procurement/v1/production/plan/findProductionPlanPage', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 3生产计划状态统计数量
export const findProductionPlanCountStatus = async (paylaod?: any) => {
  return await get('/procurement/v1/production/plan/findProductionPlanCountStatus', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 4生产计划作废
export const cancelProductionPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/cancelProductionPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 5开始生产计划
export const startProductionPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/startProductionPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 6生产计划终止
export const closeProductionPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/closeProductionPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 7生产计划入库
export const productionPlanInbound = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/productionPlanInbound', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 8更新生产计划
export const updateProductionPlan = async (paylaod?: any) => {
  return await post('/procurement/v1/production/plan/updateProductionPlan', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 9获取生产计划详情
export const getProductionPlanInfo = async (paylaod?: any) => {
  return await get('/procurement/v1/production/plan/getProductionPlanInfo', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// ------------------------------获取默认申购信息-----------------------------
// 查询Erp采购报价工费
export const findErpPurchaseQuoteCost = async (paylaod?: any) => {
  return await post('/procurement/v1/purchase/plan/v2/findErpPurchaseQuoteCost', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 查询最新申购单明细（业务-不分页）
export const findLatestPlanItemList = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/plan/v2/findLatestPlanItemList', paylaod)
    .then((res) => res)
    .catch(() => false)
}
// 查询最新c采购订单明细（业务-不分页）
export const findLatestPurchaseItemList = async (paylaod?: any) => {
  return await get('/procurement/v1/purchase/order/v2/findLatestPurchaseItemList', paylaod)
    .then((res) => res)
    .catch(() => false)
}
